package com.qing.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qing.eduservice.entity.pojo.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qing.eduservice.entity.vo.CourseInfoVo;
import com.qing.eduservice.entity.vo.CourseQuery;
import com.qing.eduservice.entity.vo.CourseQueryVo;
import com.qing.servicebase.utils.ResponseResult;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author Yjx
 * @since 2022-09-08
 */
public interface EduCourseService extends IService<EduCourse> {

    /**
     * 保存课程和课程详情信息
     * @return 新生成的课程id
     */
    ResponseResult saveCourseInfo(CourseInfoVo courseInfoVo);

    ResponseResult getCourseInfoFormById(String id);

    ResponseResult updateCourseInfoById(CourseInfoVo courseInfoVo);

    ResponseResult getCoursePublishVoById(String id);

    ResponseResult publishCourseById(String id);

    ResponseResult pageQuery(Page<EduCourse> pageParam, CourseQuery courseQuery);

    ResponseResult removeByCourseId(String courseId);

    ResponseResult selectByTeacherId(String teacherId);

    ResponseResult pageListWeb(Page<EduCourse> pageParam, CourseQueryVo courseQuery);

    /**
     * 获取课程信息
     * @param id
     * @return
     */
    ResponseResult selectInfoWebById(String id);

    /**
     * 更新课程浏览数
     * @param id
     */
    ResponseResult updatePageViewCount(String id);

}
